import request from '@/utils/request'

// 查询首页导航栏名称列表
export function listNavigation(query) {
  return request({
    url: '/allocation/navigation/list',
    method: 'get',
    params: query
  })
}

// 查询首页导航栏名称详细
export function getNavigation(id) {
  return request({
    url: '/allocation/navigation/' + id,
    method: 'get'
  })
}

// 新增首页导航栏名称
export function addNavigation(data) {
  return request({
    url: '/allocation/navigation',
    method: 'post',
    data: data
  })
}

// 修改首页导航栏名称
export function updateNavigation(data) {
  return request({
    url: '/allocation/navigation',
    method: 'put',
    data: data
  })
}

// 删除首页导航栏名称
export function delNavigation(id) {
  return request({
    url: '/allocation/navigation/' + id,
    method: 'delete'
  })
}
//修改导航栏启用状态
export function changeNavigationStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/allocation/navigation/changeStatus',
    method: 'put',
    data: data
  })
}


